/*
 * =====================================================================================
 *
 *       Filename:  sqstack.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  10/31/2010 11:05:49 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (), 
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef _SQSTACK_H_
#define _SQSTACK_H_

#define STACK_INIT_SIZE 10
#define STACKINCREMENT 10

typedef int status;

typedef int sqdata;

typedef struct SNode
{
    sqdata *base;
    sqdata *top;

    int stacksize;

}sqstack;

status init_stack(sqstack *S);
status destroy_stack(sqstack *S);
status clear_stack(sqstack *S);
status stack_is_empty(sqstack *S);
int stack_length(sqstack *S);
status get_top(sqstack *S, sqdata *e);
status push(sqstack *S, sqdata e);
status pop(sqstack *S, sqdata *e);
status stack_traverse(sqstack *S, status(*visit)());
status display(sqstack *S);

#endif
